<?php $this->headScript()
      ->prependFile($this->baseUrl() . '/application/modules/Exam/externals/scripts/test.js')
?>    
<div class="headline">
    <h2>
        <?php echo $this->translate('Exams');?>
    </h2>
    <div class="tabs">
        <?php
        // Render the menu
        echo $this->navigation()
        ->menu()
        ->setContainer($this->navigation)
        ->render();
        ?>
    </div>
</div>
<div class="headline">
   
    <div class="tabs">
        <?php
        // Render the menu
        echo $this->navigation()
        ->menu()
        ->setContainer($this->subnavigation)
        ->render();
        ?>
    </div>
</div>

<?php
    $question = $this->Question();
    $question->setExam($this->exam);
    if(!empty($this->finishTest)){
        $question->setIsShowAnswer(true);
        $question->setViewStaticAnswer(true);
        $question->setReadOnlyAnswer(true);
        $question->setUserAnswerQuestion($this->useranswers);
        $question->setFinishTest(true);
    }
?>

<form method="post" class="exam_form_test" id="exam_form_test"> 
<?php 
    echo $question->render();
 ?>
 <div style="clear:both;">
    <button type="button" id="exam_form_test_next">Next</button>
    <button type="submit" id="exam_form_test_submit">Finish</button> 
 </div>
 
 </form>
<!-- 
<script type="text/javascript">
window.addEvent('domready',function(){
    
    <?php if($this->finishTest): ?>
        exam.test.showResult = true;
    <?php endif;?>
    exam.test.initFormQuestion(<?php echo $this->type?>,<?php echo $this->numberquestion?>);
   
    $('exam_form_test_next').addEvent('click',function(){
        exam.test.showQuestion();
    });
});
</script>
-->